package homework;

public class EmployeeTest {
    public static void main(String[] args) {
        Employee[] employees = new Employee[4];
        employees[0] = new SalariedEmployee("张三", 3, 5000);
        employees[1] = new HourlyEmployee("李四", 3, 50, 200);
        employees[2] = new SalesEmployee("王五", 3, 10000, 0.1);
        employees[3] = new BasePlusSalesEmployee("赵六", 3, 5000, 20000, 0.2);
        for (Employee employee : employees) {
            System.out.println(employee.getName() + "在三月份的工资为：" + employee.getSalary(3));
        }
    }
}










